pkg_name=gtk+
MAJOR=3
MINOR=16
MICRO=0
version=$MAJOR.$MINOR.$MICRO
build_dir=$builds_dir_root/$pkg_name-$version
src_dir=$src_dir_root/$pkg_name-$version
url=http://ftp.gnome.org/pub/gnome/sources/$pkg_name/$MAJOR.$MINOR/$pkg_name-$version.tar.xz

cd "$src_dir_root"
rm -Rf "$pkg_name-$version"
tar Jxf "$pkg_name-$version.tar.xz"

cd "$src_dir"
cp -f "$builders_dir_root/$pkg_name/Makefile.in.patch" ./
patch -Ni ./Makefile.in.patch

rm -Rf "$build_dir"
mkdir -p "$build_dir"
cd "$build_dir"

export CFLAGS=-O0
"$src_dir/configure"			\
	--prefix=/			\
	--enable-largefile		\
	--enable-debug=no		\
	--enable-xkb			\
	--disable-xinerama		\
	--enable-xrandr			\
	--enable-xfixes			\
	--enable-xcomposite		\
	--enable-xdamage		\
	--enable-x11-backend		\
	--disable-win32-backend		\
	--disable-quartz-backend	\
	--disable-broadway-backend	\
	--disable-wayland-backend	\
	--disable-mir-backend		\
	--disable-quartz-relocation	\
	--disable-explicit-deps		\
	--disable-glibtest		\
	--enable-modules		\
	--disable-cups			\
	--disable-papi			\
	--disable-cloudprint		\
	--disable-test-print-backend	\
	--disable-schemas-compile	\
	--disable-introspection		\
	--disable-colord		\
	--disable-gtk-doc		\
	--disable-man			\
	--disable-doc-cross-references	\
	--with-gnu-ld
	
unset CFLAGS

make

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "DESTDIR=$install_tmp_dir"

install_dirs "$builders_dir_root/$pkg_name/runtime.dirs"
install_files "$builders_dir_root/$pkg_name/runtime.files" "$install_tmp_dir"
install_links "$builders_dir_root/$pkg_name/runtime.links"
install_dirs "$builders_dir_root/$pkg_name/devel.dirs"
install_files "$builders_dir_root/$pkg_name/devel.files" "$install_tmp_dir"
install_links "$builders_dir_root/$pkg_name/devel.links"
elf_strip "$builders_dir_root/$pkg_name/elf-strip"

rm -Rf "$install_tmp_dir"
rm -Rf "$build_dir"
rm -Rf "$src_dir"
